﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hrm.Core
{
    public class Role : Entity
    {
        [MaxLength(20)]
        [Display(Name = "角色编号")]
        public string Code { get; set; }

        [MaxLength(20)]
        [Display(Name = "角色名称")]
        public string Name { get; set; }

        [MaxLength(20)]
        [Display(Name = "角色描述")]
        public string Description { get; set; }

        [JsonIgnore]
        public virtual ICollection<ResourceAndPermission> ResourceAndPermissions { get; set; }

        [JsonIgnore]
        public virtual ICollection<User> Users { get; set; }
    }
}
